/**
 *
 */
/*package net.xiduth.game.player;
 
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Formatter;
import java.util.concurrent.CopyOnWriteArrayList;
import java.io.BufferedWriter;
 
import net.xiduth.game.player.Player;
import net.xiduth.utils.Logger;
import net.xiduth.utils.SerializableFilesManager;
/**
 * @author Kyle
 *
 */
/*
public class CreateClan {
       
                public static CopyOnWriteArrayList<Player> clanList;
                static Clanchat clanName;
                private static Player player;
                static String clan;
                private static final String PATH = "data/clan/" + clan   + ".ser";
                private static boolean edited;
                private static BufferedWriter fw;
                private static Formatter x;
 
                @SuppressWarnings("unchecked")
                public static void init() {//going to make something else out of this
                        String name = "s";
                        final String PATH2 = "data/clan/" + name   + ".ser";
                        File file = new File(PATH2);
                        try {
                       
                        if (!file.exists()){
                                clanList = (CopyOnWriteArrayList<Player>) SerializableFilesManager
                                                .loadSerializedFile(file);
                                x = new Formatter(PATH2);
                                x.close();
                                return;
                                        }else{
                                                player.getPackets().sendGameMessage("This clan name already exists.");
                                        }
                                } catch (Throwable e) {
                                        Logger.handle(e);
                                }
                        clanList = new CopyOnWriteArrayList<Player>();
                }
                @SuppressWarnings("unchecked")
                public static void make(String name){
                        final String PATH1 = "C://Users/PC/Dropbox/Xiduth RSPS/Xiduth Server/data/clan/"+ name + ".ser";
                       
                        File file = new File(PATH1);
                        try {
                       
                        if (!file.exists()){
                                clanList = (CopyOnWriteArrayList<Player>) SerializableFilesManager
                                                .loadSerializedFile(file);
                                x = new Formatter(PATH1);
                                x.close();
                                return;
                                        }else if(file.exists()){
                                                player.getPackets().sendGameMessage("This clan name already exists.");
                                        }
                                } catch (Throwable e) {
                                        Logger.handle(e);
                                }
                        clanList = new CopyOnWriteArrayList<Player>();
                }
                public CreateClan(){
                       
                }
                public static final void save() {
                        if (!edited)
                                return;
                        try {
                                SerializableFilesManager.storeSerializableClass(clanList, new File(
                                                PATH));
                                edited = false;
                        } catch (Throwable e) {
                                Logger.handle(e);
                        }
                }
                public static String getFile(){
                        return PATH;
                }
                public static void receiveFile(){
                        CreateClan.getFile().equalsIgnoreCase(player.getClanChat().getChannelName());
                }
                public static boolean isRemoved(String person) {
                        return clanList.contains(person);
                }
 
                public static void add(Player player, boolean loggedIn) {
                        player.setPermClan(true);
                        if(player.isPermInClan()){
                        player.getPackets().sendGameMessage("You are already in a clan.");     
                        }              
                        if (loggedIn) {
                                clanList.add(player);
                        } else {
                                clanList.add(player);
                                SerializableFilesManager.savePlayer(player);
                        }
                        edited = true;
                }
                public static void deleteClan(String s){
                        try{
                                File file = new File(s);
                                if(file.exists()){
                                        file.delete();
                                }else{
                                        player.getPackets().sendGameMessage("This clan doesnt exist.");
                                }
                        }catch(Exception e){
                               
                        }
               
                }
                public static void remove(Player player) {
                        player.setPermClan(false);
                        player.getClanChat().kickPlayerFromChat(player, null);
                        clanList.remove(player.getClanChat().getChannelName());
                        edited = true;
                        save();
                }
 
                public static void checkCurrent() {
                        for (Player list : clanList) {
                                System.out.println(list);
                        }
                }
 
                public static CopyOnWriteArrayList<Player> getList() {
                        return clanList;
                }
               
       
 
} */